# 通过执行命令创建数据的表
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from comment.models import db
from Shopping import creat_app

# 创建flask的app
app = creat_app('develop')
# 初始化命令创建manager
manager = Manager(app)
# 初始化migrate,绑定app，db
Migrate(app, db)
# 添加命定
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
